<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@ include file="/skin2014/commonJava.jsp"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<head>
<link type="text/css" rel="Stylesheet" href="<%=skin2014Css %>style_div.css" />
<link type="text/css" rel="Stylesheet" href="<%=skin2014Css %>case.css" />
<script src="<%=skin2014Jquery %>jquery-1.7.1.js" type="text/javascript" ></script>
<script src="<%=skin2014Script %>autoParentHeight.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
    var page = ${indexPictureView.current};
    var page_count = ${indexPictureView.pageCount}; //每版放4个图片
    //向后 按钮
    $("span.next").click(function(){    //绑定click事件
		 if( page == page_count ){  //已经到最后一个版面了,如果再向后，必须跳转到第一个版面。
				page = 1;
			}else{
				page++;
		 }
		 pageHandle(page);
   });
    //往前 按钮
    $("span.prev").click(function(){
		 if( page == 1 ){  //已经到第一个版面了,如果再向前，必须跳转到最后一个版面。
				page = page_count;
		}else{
				page--;
		}
		 pageHandle(page);
    });
});
function pageHandle(current) {
	$("input[name='current']").val(current);
    document.forms[0].target = "_self";
    document.forms[0].submit();
}
</script>
</head>
<body>
	<form action="./indexSmallPictureView.do">
		<input name="current"  value="${indexPictureView.current}" type="hidden">
		<input name="searchCategoryCode"  value="${param.searchCategoryCode}" type="hidden">
	</form>
	<div class="v_show">
	<div class="v_caption">
	<span style="margin-left:10px; width: 240px;  font: 16px/36px Microsoft Yahei; float: left;">案例展示&nbsp;&nbsp;(点击小图查看大图)</span>
		<div style="display: block; float: right;">
			<div class="highlight_tip">
				<c:forEach begin="1" end="${indexPictureView.pageCount}" var="pageCount">
					<c:choose>
					<c:when  test="${indexPictureView.current eq pageCount}">
						<span class="current">${pageCount}</span>
					</c:when>
					<c:otherwise> 
						<span>${pageCount}</span>
					</c:otherwise>
					</c:choose>
				</c:forEach>
				<!-- <span class="current">1</span><span>2</span><span>3</span><span>4</span> -->
			</div>
			<div class="change_btn" style="margin-right:  5px;">
				<span class="prev" title="上一页" >上一页</span>
				<span class="next" title="下一页" >下一页</span>
			</div>
			<!-- <em style="margin-left: 5px; margin-right: 10px;"><a href="#">更多>></a></em> -->
		</div>
	</div>
	<div class="v_content">
		<div  class="v_content_list">
			<ul>
				<c:forEach items="${indexPictureView.resultCollection}" var="picture">
					 <li><a href="javascript:parent.showCase('<c:out value="${picture.blobId}"/>', '<c:out value="${param.searchCategoryCode}"/>');" >
					 	<img src="${indexPictureView.viewUrl}${picture.blobId}" alt="${picture.attName}" /></a>
					 <h4>
					 <c:if test="${picture.title eq \"\"}"></c:if>
					 <c:out value="${picture.attName}"/></h4>
					 </li> 
				</c:forEach>
		     </ul>
		</div>
	</div>
</div>
</body>
</html>